package com.ruoyi.system.domain;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

import java.util.Date;

/**
 * 单元信息对象 sys_unit
 * 
 * @author ruoyi
 * @date 2020-06-24
 */
public class SysUnit extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 单元ID */
    private Long unitId;

    /** 楼栋ID */
    private Long buildingId;

    @Excel(name = "楼栋名称")
    private String buildingName;

    /** 单元名称 */
    @Excel(name = "单元名称")
    private String unitName;

    /** 单元面积 */
    @Excel(name = "单元面积")
    private Long unitArea;

    /** 单元状态 '0'为空闲 '1'为即将空闲 '2'为已出租*/
    @Excel(name = "单元状态")
    private String unitStatus;

    /** 删除标志（0代表存在 2代表删除） */
    private String delFlag;

    /** 统计单元数（空闲单元或者在租单元） */
    private int number;

    /** 是否存在此岗位标识 默认不存在 */
    private boolean flag = false;

    /** 合同起租时间 */
    @Excel(name = "合同起租时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date startTime;

    /** 合同到期时间 */
    @Excel(name = "合同到期时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date endTime;

    public Date getStartTime() {
        return startTime;
    }

    public void setStartTime(Date startTime) {
        this.startTime = startTime;
    }

    public Date getEndTime() {
        return endTime;
    }

    public void setEndTime(Date endTime) {
        this.endTime = endTime;
    }

    public int getNumber() {
        return number;
    }

    public void setNumber(int number) {
        this.number = number;
    }

    public String getUnitStatus() {
        return unitStatus;
    }

    public void setUnitStatus(String unitStatus) {
        this.unitStatus = unitStatus;
    }

    public boolean isFlag() {
        return flag;
    }

    public void setFlag(boolean flag) {
        this.flag = flag;
    }

    public Long getBuildingId() {
        return buildingId;
    }

    public void setBuildingId(Long buildingId) {
        this.buildingId = buildingId;
    }

    public String getBuildingName() {
        return buildingName;
    }

    public void setBuildingName(String buildingName) {
        this.buildingName = buildingName;
    }

    public void setUnitId(Long unitId)
    {
        this.unitId = unitId;
    }

    public Long getUnitId() 
    {
        return unitId;
    }
    public void setUnitName(String unitName) 
    {
        this.unitName = unitName;
    }

    public String getUnitName() 
    {
        return unitName;
    }
    public void setUnitArea(Long unitArea) 
    {
        this.unitArea = unitArea;
    }

    public Long getUnitArea() 
    {
        return unitArea;
    }
    public void setDelFlag(String delFlag) 
    {
        this.delFlag = delFlag;
    }

    public String getDelFlag() 
    {
        return delFlag;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("unitId", getUnitId())
            .append("buildingId", getBuildingId())
            .append("buildingName", getBuildingName())
            .append("unitName", getUnitName())
            .append("unitArea", getUnitArea())
            .append("delFlag", getDelFlag())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("remark", getRemark())
                .append("startTime",getStartTime())
                .append("endTime",getEndTime())
            .toString();
    }
}
